<template>
    <view class="">
        <view class="ceiling" :style="{ 'padding-top': statusBarHeight + 'px' }" style="background-color: #FFFFFF;">
        </view>
        <!-- 顶部导航 开始 -->
        <selectHead left-button="转入" right-button="转出" class="selectBox" active-button="转入" @changeBtn="handleSelect">
            <view slot="left" @click="toHome()">
                <view class="" style="color: #FFFFFF;">主页</view>
            </view>
            <view slot="right">
                <view class="flex align-center" style="position: relative;">
                 
                    <view class="Tips end_top margin-left-xs" @click="tonavigateTo('/pages/public/search/search')" style="margin-right: 5rpx;position: absolute;left: -72rpx;">
                    	<image src="/static/images/search.png" mode="widthFix" style="width: 50rpx;"></image>
                    </view>
                    <view class="Tips end_top margin-left-xs" @click="tonavigateTo('/pages/public/msg/msg')">
                        <image src="/static/images/msg.png" mode="widthFix" style="width: 50rpx;"></image>
                    </view>
                </view>
            </view>
        </selectHead>
        <!-- 顶部导航 结束 -->

        <view class="bg_12161F">
            <view v-for="(item,index) in data" @click="channel(item.id)">
                <view class="cu-form-group">
                    <view class="title text-black">{{item.bank_type}}</view>
                </view>
                <view style="border-bottom: 1px solid #F0F0F0; ">
                    <view class="cu-form-group" style="color:#FA3534;margin-top:-1px">
                        <text style="padding-top: 0;">{{item.bank_remark}}</text>
                    </view>
                </view>
            </view>
        </view>

        <!-- 新版本结束 -->

        <view>
            <u-toast ref="uToast" />
        </view>

        <!-- <view class="new_kf">
      <image
       @tap="customer"
      style="width: 100upx; height: 100upx;"
      :src="show_qiye_kf"
      @error="imageError">
      </image>
    </view> -->

    </view>
</template>

<script>
    import selectHead from "@/component/selectHead/selectHead.vue"
    import uniCopy from '@/js_sdk/xb-copy/uni-copy.js'
    export default {
        components: {
            selectHead
        },
        data() {
            return {
                statusBarHeight: getApp().globalData.statusBarHeight, //状态栏高度
                data: [],
            };
        },
        methods: {
            // 到首页
            toHome: function() {
                uni.switchTab({
                    url: '/pages/index/index'
                })
            },
            // 跳转页面
            tonavigateTo(url) {
            	uni.navigateTo({
            		url: url
            	})
            },
            //进入充值页面
            channel(channel) {
                uni.redirectTo({
                    url: '/pages/member/rechargeinfo?id=' + channel
                })
            },
            getBank() {
                this.$Request.get(this.$api.index.getBankList).then(res => {
                    if (res.code == 0) {
                        this.data = res.data;
                    }
                })
            },
            //切换头部选项卡
            handleSelect(type) {
                if (type == 'right') {
                    uni.redirectTo({
                        url: "/pages/member/cash"
                    });
                }
            },
            //返回
            handleBack() {
                uni.navigateBack({
                    delta: 1
                })
            },
        },
        
        onLoad(e) {
            this.flag = e.flag;
            this.getBank();
        }
    }
</script>

<style lang="scss" scoped>
    @import "./recharge.scss";

    .selectBox {
        background-color: #EE515A;
    }

    .cu-form-group {
        //border: #EDEDED;
        background-color: #FFFFFF;
        //padding:0;
    }

    .cu-form-group+.cu-form-group {
        // border-top: 1px solid #EDEDED;
    }

    .cu-form-group {
        padding: 0 0 0 15px !important;
    }

    .cu-form-group uni-input {
        color: #333333;
    }

    .text-black {
        font-weight: 600;
        height: 0;
        line-height: 0;
    }

    .new_kf {
        position: fixed;
        right: 6upx;
        top: 42%;
    }
</style>
